// 结算分账

import { ChannelProvider } from "@/types/api";
import { get, post,fileDownload } from "../utils/request"

// 优惠券结算 - 列表
export const loadSubAccountCouponSummary =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountCouponSummary/pageQuery',params);

// 优惠券结算 - 结算详情
export const loadSubAccountCouponOrder =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountCouponOrder/pageQuery',params);

// 优惠券结算 - 分账详情
export const loadSubAccountCouponOrderDetail =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountCouponOrderDetail/pageQuery',params);

// 资金结算 - 列表
export const loadSubAccountFundSummary =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountFundSummary/pageQuery',params);

// 资金结算 - 结算详情
export const loadSubAccountFundOrder =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountFundOrder/pageQuery',params);

// 资金结算 - 分账详情
export const loadSubAccountFundOrderDetail =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountFundOrderDetail/pageQuery',params);

// 积分结算 - 列表
export const loadSubAccountintegralSummary =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountFundSummary/pageQuery',params);

// 积分结算 - 结算详情
export const loadSubAccountintegralOrder =(params:ChannelProvider)=>post('/cdwl-merchant/subAccountIntegralOrder/pageQuery',params);

// 积分结算 - 分账详情
export const loadSubAccountintegralOrderDetail = (params: ChannelProvider) => post('/cdwl-merchant/subAccountIntegralOrderDetail/pageQuery', params);

//分账管理
export const getRoutingList = (params: ChannelProvider) => post('/pay/admin/divide/list', params);

//分账管理详情
export const getRoutingInfo = (params: ChannelProvider) => post('/pay/admin/divide/detail', params);

//分账导出
export const exportDivideAPI = (params: any, fileName: string)=>{
    return fileDownload("/pay/admin/divide/export",params, fileName)
}
